package it.sandler.android;

import it.sandler.android.database.SandlerEntity;
import it.sandler.android.database.SandlerList;
import it.sandler.android.database.types.SandlerText;

public class TaskList extends SandlerEntity {

	private SandlerText name = new SandlerText("asdasd");
	private SandlerList<Task> tasks;

	public String getName() {
		return get(name);
	}

	public void setName(String name) {
		set(this.name, name);
	}

	public SandlerList<Task> getTasks() {
		return tasks;
	}

	public void addTask(Task... tasks) {
		for (Task t: tasks) {
			t.setParentList(this);
			this.tasks.add(t);
		}
	}

}
